<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 代码样式初始化 */
        *{
            margin: 0;
            padding: 0;
        }
        /* 代码主体 */
        body{
            font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB','Microsoft YaHei', Arial, 'sans-serif';
            height: 100vh;
            width: 100vw;
            background-image: url(./imgs/bg.jpeg);
            background-position: center;
            background-size: cover;
            min-width: 1100px;
        }
        .login_box{
            width: 492px;
            height: 342px;
            background: rgba(0,0,0,0.4);
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%,-50%);
            border-radius: 5px;
            overflow: hidden;
        }
        .avatar{
            width: 142px;
            height: inherit;
            background: #fff;
            float: left;
        }
        .avatar img{
            width: 72px;
            border-radius: 50%;
            height: 76px;
            display: block;
            margin: 133px auto;
        }
        form{
            width: 300px;
            height: 276px;
            float: right;
            padding: 33px 25px;
        }
        form h1{
            color: #fff;
            font-size: 32px;
            font-weight: normal;
            line-height: 40px;
            margin-bottom: 6px;
            text-align: center;
        }
        form h1+p{
            line-height: 14px;
            color: #a2a0a0;
            font-size: 14px;
            text-align: center;
        }
        form .item{
            margin-top: 16px;
            border-bottom: 1px solid #f9f9f9;
            position: relative;
        }
        form .item h2{
            color: #a2a0a0;
            font-size: 12px;
            line-height: 14px;
            margin-bottom: 10px;
        }
        form .item input{
            width: 100%;
            outline: none;
            border: none;
            background: transparent;
            color: #fff;
            line-height: 25px;
            height: 25px;
        }
        form .item input+span{
            position: absolute;
            width: 0%;
            height: 1px;
            background: #fff;
            left: 50%;
            bottom: -1px;
            transition: all .3s;
        }
        form .item input:focus+span,
        form .item input:valid+span{
            width: 100%;
            left: 0;
        }
        form button{
            margin-top: 15px;
            width: 300px;
            height: 38px;
            border: none;
            outline: none;
            color: #fff;
            font-size: 14px;
            cursor: pointer;
            border-radius: 5px;
            background: #00897B;
        }
        form .setting{
            margin-top: 14px;
            color: #a2a0a0;
            font-size: 12px;
        }
        form .setting a{
            color: inherit;
            display: block;
            width: 50%;
            text-align: center;
            float: left;
            line-height: 18px;
            text-decoration: none;
        }
    </style>
</head>
<body>
    <div class="login_box">
        <!-- 左侧 -->
        <div class="avatar">
            <img src="./imgs/avatar.png" alt="">
        </div>
        <!-- 右侧 -->
        <form>
            <h1>欢迎回来</h1>
            <p>请先登录</p>
            <div class="item">
                <h2>用户名</h2>
                <input type="text" required>
                <span></span>
            </div>
            <div class="item">
                <h2>密码</h2>
                <input type="password" required>
                <span></span>
            </div>
            <button>登录</button>
            <div class="setting">
                <a href="">忘记密码？</a>
                <a href="">新用户？</a>
            </div>
        </form>
    </div>
</body>
</html>